/**
* @Author: 858834013@qq.com
* @Name: typeSelector
* @Date: 2022-01-18
* @Desc: 类型选择器
*/
<template>
	<div>
		<div @click="show=true">
			<slot></slot>
		</div>
		<u-picker :show="show" @cancel="show=false" @confirm="getConfirm" :columns="list"></u-picker>
	</div>
</template>

<script>
	export default {
		name: 'typeSelector',
		components: {},
		props: {
			list: {
				type: Array,
				default () {
					return []
				}
			}
		},
		data() {
			return {
				show: false,
			};
		},
		methods: {
			getConfirm(e) {
				console.log(e)
				this.$emit('getdata', e)
				this.show = false
			}
		}
	}
</script>

<style lang="scss" scoped>

</style>
